Skip to main content

Creating a Plain Text Template

To create a plain text template, follow the next steps:

1. Open Notepad and include the desired text content.​

The image below displays an example of an Invoice template in plain text. It includes the Customer's information and a table containing the purchased products.

Document Templates 97

2. Reference the information that will be dynamically obtained from the Bizagi data model using Tags.​

Information to be retrieved from Bizagi must be specified within Tags, e.g., [AttributeName].

In this example, the Customer's name is referenced with the [CustomerName] Tag.

Document Templates 98

To make reference to a collection, use the following tags:

  • [Foreach:CollectionName]: Indicates the starting point of the collection.
  • [AttributeName]: All attributes between the Foreach and the End tag must belong to the collection.
  • [End]: Indicates the end of the collection.

Document Templates 99

Note In the image above, the Products collection is referenced by using the [Foreach:Products] sentence. All the tags typed from this tag until the [End] tag are assumed to be attributes of this collection ([Product], [Quantity], [Price]).

Note:

  • The attribute and collection names can be different from the names given in the data model. These are only references for mapping the information.
  • Tags cannot contain spaces.
  • Every single tag for the columns of all collections MUST be unique. No two columns in a document can have the same tag name, even if they belong to different tables.

3. Save your template.​

Once the text structure is completed, save the document as a standard text file (.txt).

Document Templates 100

Note:

  • In a single document, you can include the same tag multiple times. You will only need to map it once.
  • This rule DOES NOT apply to tags for collections. There can only be ONE tag for each [Foreach].